#define MIPS 40

void delay_ms (unsigned long delay_count)
{
	delay_count = delay_count * MIPS * 100;
	
	while(delay_count--);
}

void delay_us (unsigned int delay_count)
{
	delay_count = delay_count * MIPS / 4;
	
	while(delay_count--);
}